package DMSXL._2023Before.HashTable;

/*public class isAnagram_ {
    public static void main(String[] args) {
        String s = "rat";
        String t = "car";
        Solution solution = new Solution();
        System.out.println(solution.isAnagram(s,t));
    }
}
class Solution {
    public boolean isAnagram(String s, String t) {
        if(s.length() != t.length()){
            return false;
        }

        int[] table = new int[26];

        for (int i = 0; i < s.length(); i++) {
            table[s.charAt(i) - 'a']++;
        }

        for (int i = 0; i < t.length(); i++) {
            table[t.charAt(i) - 'a']--;
            if(table[t.charAt(i) - 'a'] < 0){
                return false;
            }
        }

        return true;

    }
}*/
